xend: Fix block device type check
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 29 Jan 2009 16:39:56 +0000 (16:39 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 29 Jan 2009 16:39:56 +0000 (16:39 +0000)
commit597edba986d2516dfa478f5c4ec34325da49283b
tree85d32434f6df09113b6ddd6ec4e0b02eae168f10
parentaab43dddfe36e154b674bd3de6a54e0d63629a91
xend: Fix block device type check

Since changeset 17617 the block device protocols are checked to be
either file or phy. This has later been fixed to also include
tap. This is still not a correct check as there can be arbitrary
additional protocols. Before this check was added you could have a
block-xyz hotplug script and xyz would work as a protocol, now it is
refused. An example for this mechanism is the block-nbd script which
is included in the tree.

This patch changes the check to allow file, phy, tap and all protocol
names for which a block-$protocol hotplug script exists. This should
fix the last regressions introduced by the check.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
tools/python/xen/xend/server/blkif.py